#include <ranges>
#include <iostream>
#include <string>
#include <vector>

// 12 12 11 5 -5 -5 40 194 558 1278 2553 4643 7877 12661 19486 28936 41696 58560 80439 108369 143519

namespace ranges = std::ranges;
namespace views  = std::ranges::views;

auto string_split(std::string_view s, char delim = ' ') -> std::vector<std::string>
{
    std::vector<std::string> tokens {};
    for (auto token : s | std::views::split(delim))
        tokens.emplace_back(token.begin(), token.end());
    return tokens;
}

auto tok(std::string_view delims, auto input)
{
    if (input.empty()) return ranges::empty;
    
    const char front {input.front()};
    
    if (delims.find(front) == std::string_view::npos) 
        return tok(delims, input | views::drop(1));
    
    return 
}

int main()
{
    for (const auto& s : string_split(" 12 12 11 5 -5 -5 40 194 558 1278 2553 4643 7877 12661 19486 28936 41696 58560 80439 108369 143519"))
        std::cout << s << std::endl;
    return 0;
}
